'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  const adminauth = app.middleware.adminAuth();
  router.get('/admin/index', adminauth, controller.admin.admin.index);
  router.get('/admin/getPersonalInfo/', adminauth, controller.admin.admin.getPersonalInfo);
  router.post('/admin/alertPersonalInfo/', adminauth, controller.admin.admin.alertPersonalInfo);
  router.post('/admin/addArticle/', adminauth, controller.admin.admin.addArticle);
  router.get('/admin/getArticleList/', adminauth, controller.admin.admin.getArticleList);
  router.get('/admin/deleteArticle/:id', adminauth, controller.admin.admin.deleteArticle);
  router.get('/admin/getArticle/:id', adminauth, controller.admin.admin.getArticle);
  router.post('/admin/alertArticle/', adminauth, controller.admin.admin.alertArticle);
  router.get('/admin/getSkillType/', adminauth, controller.admin.admin.getSkillType);
  router.get('/admin/guestbook/', adminauth, controller.admin.admin.guestbook);
  router.get('/admin/deleteGuestbook/:id', adminauth, controller.admin.admin.deleteGuestbook);
  router.get('/admin/liveList/', adminauth, controller.admin.admin.liveList);
  router.get('/admin/deleteLive/:id', adminauth, controller.admin.admin.deleteLive);
  router.post('/admin/addLive/', adminauth, controller.admin.admin.addLive);
  router.post('/admin/login/', controller.admin.admin.login);
  router.get('/admin/loginout/', adminauth, controller.admin.admin.loginout);
  router.post('/admin/alertPassword/', adminauth, controller.admin.admin.alertPassword);
  router.post('/admin/upImgToTemporary/', controller.admin.admin.upImgToTemporary);
  router.get('/admin/yasuoBGI/', controller.admin.admin.yasuoBGI);
};
